/**
 * @description 生成组件列表
 * @author superrui
 */
const Mock = require("mockjs");
const Random = Mock.Random;
function getComponentList() {
  return [
    //Info
    {
      fe_id: 'c1',
      type: "questionInfo", //类型不能重复，前后端定义好
      title: "问卷信息",
      isHidden: false,
      isLocked: false,
      props: {
        title: "问卷标题",
        desc: "问卷描述",
      },
    },

    //Title
    {
      fe_id: 'c2',
      type: "questionTitle", //类型不能重复，前后端定义好
      title: "标题",
      isHidden: false,
      isLocked: false,
      props: {
        text: "个人信息调研",
        level: 2,
        isCenter: false,
      },
    },
    //Paragraph
    {
      fe_id: 'c3',
      type: "questionParagraph", //类型不能重复，前后端定义好
      title: "段落",
      isHidden: false,
      isLocked: false,
      props: {
        text: "一行段落1",
        isCenter: false,
      },
    },
     {
      fe_id: 'c9',
      type: "questionParagraph", //类型不能重复，前后端定义好
      title: "段落",
      isHidden: false,
      isLocked: false,
      props: {
        text: "一行段落2",
        isCenter: false,
      },
    },
    //Input
    {
      fe_id: 'c4',
      type: "questionInput",
      title: "输入框",
      isHidden: false,
      isLocked: false,
      props: {
        title: "姓名",
        placeholder: "请输入姓名...",
      },
    },

    {
      fe_id: 'c5',
      type: "questionInput",
      title: "输入框",
      isHidden: false,
      isLocked: false,
      props: {
        title: "电话",
        placeholder: "请输入电话...",
      },
    },
    {
      fe_id: 'c6',
      type: "questionTextarea",
      title: "多行输入",
      isHidden: false,
      isLocked: false,
      props: {
        title: "你的爱好1\n你的爱好2",
        placeholder: "请输入爱好...",
      },
    },
    //radio
    {
      fe_id: 'c7',
      type: "questionRadio",
      title: "单选",
      isHidden: false,
      isLocked: false,
      props: {
        title: "单选标题",
        isVertical: false,
        options: [
          { value: "item1", text: "选项1" },
          { value: "item2", text: "选项2" },
          { value: "item3", text: "选项3" },
        ],
        value: "", //默认是空
      },
    },
    //checkbox
    {
      fe_id: 'c8',
      type: "questionCheckbox",
      title: "多选",
      isHidden: false,
      isLocked: false,
      props: {
        title: "多选标题",
        isVertical: false,
        list: [
          { value: "item1", text: "选项1", checked: false },
          { value: "item2", text: "选项2", checked: false },
        ],
        value: "", //默认是空
      },
    },
  ];
}
module.exports = getComponentList;
